<!DOCTYPE HTML>
<html>

<head>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>{$item['id']?'编辑':'发布'}任务</title>
    <link href="/static/home/mobile/css/reset_5.css" rel="stylesheet" type="text/css" />
    <link href="/static/home/mobile/css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/static/home/mobile/js/jquery.min.js"></script>
    <link rel="stylesheet" href="/static/home/mobile/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="/static/home/mobile/css/facaeincon.css" />
    <link rel="stylesheet" type="text/css" href="/static/home/mobile/css/base64face.css" />   
    <link rel="stylesheet" type="text/css" href="/static/home/mobile/css/baseface3.css" />
    <link rel="stylesheet" type="text/css" href="/static/home/mobile/css/new_page.css?v=2" />
    <link rel="stylesheet" type="text/css" href="/static/home/mobile/css/add_newpage.css?v=2" />
    <link rel="stylesheet" type="text/css" href="/static/home/mobile/css/mobileSelect.css" />
    <!-- 日期选择 -->
    <script src="/static/plugins/mobiscroll-2.5.2/dev/js/mobiscroll.core-2.5.2.js" type="text/javascript"></script>
    <script src="/static/plugins/mobiscroll-2.5.2/dev/js/mobiscroll.core-2.5.2-zh.js" type="text/javascript"></script>
    <link href="/static/plugins/mobiscroll-2.5.2/dev/css/mobiscroll.core-2.5.2.css" rel="stylesheet" type="text/css" />
    <link href="/static/plugins/mobiscroll-2.5.2/dev/css/mobiscroll.animation-2.5.2.css" rel="stylesheet" type="text/css" />
    <script src="/static/plugins/mobiscroll-2.5.2/dev/js/mobiscroll.datetime-2.5.1.js" type="text/javascript"></script>
    <script src="/static/plugins/mobiscroll-2.5.2/dev/js/mobiscroll.datetime-2.5.1-zh.js" type="text/javascript"></script>
    <script src="/static/plugins/mobiscroll-2.5.2/dev/js/mobiscroll.android-ics-2.5.2.js" type="text/javascript"></script>
    <link href="/static/plugins/mobiscroll-2.5.2/dev/css/mobiscroll.android-ics-2.5.2.css" rel="stylesheet" type="text/css" />
    <!-- 日期选择 -->

    <!-- 弹出层 -->
    <link rel="stylesheet" href="/static/plugins/dialog/css/dialog.css" />
    <script src="/static/plugins/dialog/lib/zepto.min.js"></script>
    <script src="/static/plugins/dialog/js/dialog.js"></script>  
    <!-- 弹出层 -->
    <script type="text/javascript" src="/static/home/mobile/js/global.js"></script>
    <!-- 页面特效 -->

    <script type="text/javascript" src="/static/home/mobile/js/mobile_index.js?v=<?=rand(1,100);?>"></script>
    <script type="text/javascript" src="/static/home/mobile/js/auto-size.js"></script>
    <script type="text/javascript" src="/static/home/mobile/js/mobileSelect.js"></script>
    
        <script type="text/javascript" src='/static/home/mobile/js/vconsole.min.js'></script>
    <script>
        var vConsole = new VConsole();
    </script>
    
    <style type="text/css">
        .new-header .dowm-btn {
            bottom: 0;
        }
        .new-header .back {
            bottom: 18px;
           float: left;
         	 background: url(../../static/home/mobile/images/return.png) no-repeat;
          background-size: auto;
          background-size: 9px 21px;
          margin-top: 5px;
        }
        .image-box-img{
            display: flex;
            display: -webkit-flex;
            margin-bottom: 10px;
        }
        .images-box,.image-box-img{
            display: flex;
            display: -webkit-flex;
            flex-flow: wrap;
            margin-bottom: 10px;
        }
        .images-box .item,.image-box-img .item{
            margin-right: 5px;
            margin-bottom: 5px;
            width: 100px;
            height: 100px;
            position: relative;
        }
        .images-box .item input,.image-box-img .item input{
            position: absolute;
            z-index: 3;
            opacity: 0;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
        }
        .images-box .item span,.image-box-img .item span{
            display: block;
            width: 100px;
            height: 100px;
            text-align: center;
            line-height: 60px;
        }
        .images-box .img-item img,.image-box-img .item img{
            width: 100%;
            height: 100%;
        }
      .dialog-toast .info-icon{
        margin-left:45px;
      }
      .step{
        margin-bottom:10px;
        height:100%;
      }
        .mobileSelect .grayLayer{
            background: rgba(0, 0, 0, 0.7);
        }
    </style>
</head>

<body>
<header class="new-header" style="padding-top: 15px;">
    <a href="javascript:history.go(-1)" class="back"></a>
    <div class="tit-name">{$item['id']?'编辑':'发布'}悬赏</div>
  <!--  <span class="dowm-btn publish-task-btn">{$item['id']?'保存':'发布'}</span>-->
</header>
<div class="form-div">
<form id="post_form">
    <div class="step-task-item">
        <div class="add-step-task-item step-list ">
            <div class="step-item-title">
                选择分类
            </div>
            <div class="circle-container">
                <i class="van-icon van-icon-edit"></i>
            </div>
            <div class="step-line">

            </div>
        </div>
        <div class="add-step-task-item step-list ">
            <div class="step-item-title">
                基本信息
            </div>
            <div class="circle-container">
                <i class="van-step__circle"></i>
            </div>
            <div class="step-line">

            </div>
        </div>
        <div class="add-step-task-item step-list ">
            <div class="step-item-title">
                任务步骤
            </div>
            <div class="circle-container">
                <i class="van-step__circle"></i>
            </div>
            <div class="step-line">

            </div>
        </div>
        <div class="add-step-task-item step-list ">
            <div class="step-item-title">
                任务组
            </div>
            <div class="circle-container">
                <i class="van-step__circle"></i>
            </div>
            <div class="step-line">

            </div>
        </div>
        <div class="add-step-task-item step-list ">
            <div class="step-item-title">
                提交申请
            </div>
            <div class="circle-container">
                <i class="van-step__circle"></i>
            </div>
            <div class="step-line">

            </div>
        </div>
    </div>
    <div class="task" >
        <!-- 选择分类 -->
        <div class="step show-item" >
            <div class="task-item catagory-tree-select">
                {if condition="isset($item['is_display']) && $item['is_display'] == -1"}
                <span class="task-span" style="color: #FE511C;">任务未通过审核原因：</span>
                <p style="color: #272727;font-size: 13px;padding-right: 10px;">
                    {if condition="!empty($item['audit_remarks'])"}
                    {$item['audit_remarks']|nl2br}
                    {/if}
                </p>
                {/if}
                <div class="select-catagory">
                    <div class="catagor-ellipsis tree-select">所有分类：</div>
                    <div class="catagor-ellipsis tree-select">简单悬赏：</div>
                    <div class="catagor-ellipsis tree-select">高价悬赏：</div>
                    <div class="catagor-ellipsis tree-select">其他：</div>
                </div>
                <div class="catagory-item">
                    <input type="hidden" name="category_id" value="{$item['category_id']?$item['category_id']:'2'}"/>
                    {if condition="!empty($categories)"}

                        {volist name="categories" id="category"}
                             <div class="catagor-ellipsis catagory-select-item" id="task-select_{$category['id']}" data-id="{$category['id']}">
                                 {$category['title']}
                             </div>
                        {/volist}

                    {/if}
                </div>

                

            </div>
        </div>
        <!-- 基本信息 -->
        <div class="step">
            <div class="task-item">
                <span class="new-add-task-label">任务标题：</span>
                <input type="text" name="title" class="task-txt new-add-task-content" placeholder="请输入任务标题" value="{$item['title']?$item['title']:''}" required/>
                <div class="error-message"></div>
            </div>
            <div class="task-item">
                <span class="new-add-task-label">应用名称：</span>
                <input type="text" name="appName" class="task-txt new-add-task-content" placeholder="必须真实应用名，否则审核不过" value="{$item['appName']?$item['appName']:''}" required/>
                <div class="error-message"></div>
            </div>
            <div class="task-item" style="padding: 0 0 10px;">
                <span class="new-add-task-label">任务详情：</span>
                <textarea class="shuoming  new-add-task-content" name="detail" placeholder="请在这里说明详细的需求和操作流程，审核标准（必填）" datatype="s10-500" required>{$item['detail']?$item['detail']:''}</textarea>
                <div class="error-message"></div>
            </div>
            <div class="task-item">
                        <span class="task-span" id="task-isRepeat" style="display:inline;">
                            <input type="hidden" name="rate" value="{$item['rate']?$item['rate']:'0'}">
                            <a data-rate="0" class="t_wx {if !isset($item['rate']) || $item['rate']==0}t_wx_selected{/if}">仅限一次</a>
                           <!--  <a data-rate="1" class="t_wx {if isset($item['rate']) && $item['rate']==1}t_wx_selected{/if}">每天一次</a>
                           <a data-rate="2" class="t_wx {if isset($item['rate']) && $item['rate']==2}t_wx_selected{/if}">定时任务</a>-->
                        </span>
            </div>
        </div>

        <!-- 设置步骤 -->
        <div class="step">

            <div class="van-cell-group van-hairline--top-bottom">
                <div class="van-cell van-cell--clickable">
                    <i class="van-icon van-icon-add-o van-cell__left-icon"></i>
                    <div class="van-cell__title">
                        <span>添加步骤</span>
                    </div>
                    <div class="van-cell__value">
                        <span>选择步骤类型</span>
                    </div>
                    <i class="van-icon van-icon-arrow van-cell__right-icon"></i>
                </div>
            </div>
              <div class="van-overlay" style="display: none; z-index: 3;"></div>
            <?php if(isset($operate_steps)){?>
            <?php foreach($operate_steps as $k => $v){?>
                <?php if($v['type'] == 1){?>
                      <div class="edit-box van-dialog" style="z-index: 2011; display: none;">
                        <div class="van-dialog__content">
                          <div class="header van-hairline--bottom">步骤1 : 收集数据</div>
                          <div class="content van-cell-group">
                            <div class="van-cell van-field">
                              <div class="van-cell__title van-field__label">
                                <span>步骤说明</span></div>
                              <div class="van-cell__value">
                                <div class="van-field__body">
                                  <textarea class="shuoming new-add-task-content" date_type="1" style="width: 100%; border: none;" id="check_text_content" placeholder="如需接单者提供文字信息，请在此输入内容，如不需要可不填"><?php echo $v['content'];?></textarea>
                                </div>
                              </div>
                            </div>
                            <div data-v-017a140a="" class="van-cell van-field">
                              <div class="van-cell__title van-field__label">
                                <span>输入提示</span></div>
                              <div class="van-cell__value">
                                <div class="van-field__body">
                                  <input type="text" placeholder="填写输入框提示内容" class="van-field__control" value="<?php echo $v['content2'];?>"></div>
                              </div>
                            </div>
                            <div class="error-message"></div>
                          </div>
                        </div>
                        <div class="van-hairline--top van-dialog__footer van-dialog__footer--buttons">
                          <button class="van-button van-button--default van-button--large van-dialog__cancel" type="button" onclick="cancelThis(this,'<?php echo $v['content'].'||'.$v['image']?>')">
                            <span class="van-button__text">取消</span></button>
                          <button class="van-button van-button--default van-button--large van-dialog__confirm van-hairline--left" type="button" onclick="saveThis(this)">
                            <span class="van-button__text">保存</span></button>
                        </div>
                      </div>

                      <div class="step-item van-cell-group van-hairline--top-bottom"   >
                        <div class="van-cell">
                          <div class="van-cell__title"  onclick="showThis(this)" >
                            <div class="van-row van-row--flex van-row--align-center">
                              <div class="icon"><?php echo $k+1;?></div>
                              <div class="title">收集数据</div></div>
                          </div>
                          <i class="van-cell__right-icon van-icon van-icon-delete" style="color: red; font-size: 18px;"  onclick="delThis(this)" >
                            <!----></i>
                        </div>
                      </div>

                <?php }elseif($v['type'] == 2){?>
                  <div class="edit-box van-dialog" style="z-index: 2011; display: none;">
                      <div class="van-dialog__content">
                        <div class="header van-hairline--bottom">步骤1 : 收集截图</div>
                        <div class="content van-cell-group">
                          <div class="van-cell van-field">
                            <div class="van-cell__title van-field__label">
                              <span>步骤说明</span></div>
                            <div class="van-cell__value">
                              <div class="van-field__body">
                                <textarea date_type="2" class="shuoming new-add-task-content" style="width: 100%; border: none;height: 72px;" id="check_text_content" placeholder="适用于需要收集截图结果，详细说明需要的截图要求及截图内容。并且上传截图示例。"><?php echo $v['content'];?></textarea>
                              </div>
                            </div>
                          </div>
                          <div data-v-017a140a="" class="van-field van-cell">
                            <div data-v-017a140a="" class="van-cell__title van-field__label">
                              <div data-v-017a140a="" style="line-height: 30px;">截图示例</div></div>
                            <div data-v-017a140a="" class="van-cell__value">
                              <div class="item img-items">
                                <img class="images-items" src="<?php echo $v['image'];?>"></div>
                              <div data-v-017a140a="" class="uploader van-uploader" style="width:100%">
                                <button data-v-017a140a="" class="van-button van-button--info van-button--small van-button--block">
                                  <span data-v-017a140a="" class="van-button__text">
                                    <i data-v-017a140a="" class="van-icon van-icon-photo-o"></i>上传示例截图</span>
                                </button>
                                <input type="file" accept="image/*" class="van-uploader__input" onchange="uploadImg(this)"></div>
                            </div>
                          </div>
                          <div class="error-message"></div>
                        </div>
                      </div>
                      <div class="van-hairline--top van-dialog__footer van-dialog__footer--buttons">
                        <button class="van-button van-button--default van-button--large van-dialog__cancel" type="button" onclick="cancelThis(this,'<?php echo $v['content'].'||'.$v['image']?>')">
                          <span class="van-button__text">取消</span></button>
                        <button class="van-button van-button--default van-button--large van-dialog__confirm van-hairline--left" type="button"  onclick="saveThis(this)">
                          <span class="van-button__text">保存</span></button>
                      </div>
                    </div>
                    <div class="step-item van-cell-group van-hairline--top-bottom"  >
                      <div class="van-cell">
                        <div class="van-cell__title"  onclick="showThis(this)"  >
                          <div class="van-row van-row--flex van-row--align-center">
                            <div class="icon"><?php echo $k+1;?></div>
                            <div class="title">收集截图</div></div>
                        </div>
                        <i class="van-cell__right-icon van-icon van-icon-delete" style="color: red; font-size: 18px;"  onclick="delThis(this)" ></i>
                      </div>
                    </div>
                  

                <?php }elseif($v['type'] == 3){?>

                  <div class="edit-box van-dialog" style="z-index: 2011; display: none;">
                      <div class="van-dialog__content">
                        <div class="header van-hairline--bottom">步骤1 : 网站跳转</div>
                        <div class="content van-cell-group">
                          <div class="van-cell van-field">
                            <div class="van-cell__title van-field__label">
                              <span>步骤说明</span></div>
                            <div class="van-cell__value">
                              <div class="van-field__body">
                                <textarea date_type="3" autofocus="autofocus" rows="3" class="van-field__control" style="height: 77px;" placeholder="适用于需要点击的链接，需要访问等操作，详细说明相关操作及注意事项。" value=""><?php echo $v['content'];?></textarea>
                              </div>
                            </div>
                          </div>
                          <div class="error-message"></div>
                          <div class="van-cell van-field">
                            <div class="van-cell__title van-field__label">
                              <span>填入网址</span></div>
                            <div class="van-cell__value">
                              <div class="van-field__body">
                                <input type="text" class="task-txt" id="about_url" placeholder="填写跳转网址，以http(s)://开头" value="<?php echo $v['content2'];?>" style="width:100%;"></div>
                            </div>
                          </div>
                          <div class="error-message"></div>
                        </div>
                      </div>
                      <div class="van-hairline--top van-dialog__footer van-dialog__footer--buttons">
                        <button class="van-button van-button--default van-button--large van-dialog__cancel" type="button"  onclick="cancelThis(this,'<?php echo $v['content'].'||'.$v['image']?>')">
                          <span class="van-button__text">取消</span></button>
                        <button class="van-button van-button--default van-button--large van-dialog__confirm van-hairline--left" type="button"  onclick="saveThis(this)">
                          <span class="van-button__text">保存</span></button>
                      </div>
                    </div>
                    <div class="step-item van-cell-group van-hairline--top-bottom" >
                      <div class="van-cell">
                        <div class="van-cell__title" onclick="showThis(this)" >
                          <div class="van-row van-row--flex van-row--align-center">
                            <div class="icon"><?php echo $k+1;?></div>
                            <div class="title">网址跳转</div></div>
                        </div>
                        <i class="van-cell__right-icon van-icon van-icon-delete" style="color: red; font-size: 18px;"  onclick="delThis(this)" >
                          <!----></i>
                      </div>
                    </div>
                <?php }elseif($v['type'] == 4){?>
                    <div class="edit-box van-dialog" style="z-index: 2011; display: none;">
                        <div class="van-dialog__content">
                          <div class="header van-hairline--bottom">步骤1 : 图文说明</div>
                          <div class="content van-cell-group">
                            <div class="van-cell van-field">
                              <div class="van-cell__title van-field__label">
                                <span>步骤说明</span></div>
                              <div class="van-cell__value">
                                <div class="van-field__body">
                                  <textarea date_type="4" placeholder="适用于需要图片说明，引导会员等操作，详细说明相关操作及注意事项。" autofocus="autofocus" rows="3" class="van-field__control" style="height: 72px;"><?php echo $v['content'];?></textarea>
                                </div>
                              </div>
                            </div>
                            <div data-v-017a140a="" class="van-field van-cell">
                              <div data-v-017a140a="" class="van-cell__title van-field__label">
                                <div data-v-017a140a="" style="line-height: 30px;">图片说明</div></div>
                              <div data-v-017a140a="" class="van-cell__value">
                                <div class="item img-items">
                                  <img class="images-items" src="<?php echo $v['image'];?>"></div>
                                <div data-v-017a140a="" class="uploader van-uploader" style="width:100%">
                                  <button data-v-017a140a="" class="van-button van-button--info van-button--small van-button--block">
                                    <span data-v-017a140a="" class="van-button__text">
                                      <i data-v-017a140a="" class="van-icon van-icon-photo-o"></i>上传说明图片</span>
                                  </button>
                                  <input type="file" accept="image/*" class="van-uploader__input" onchange="uploadImg(this)"></div>
                              </div>
                            </div>
                            <div class="error-message"></div>
                          </div>
                        </div>
                        <div class="van-hairline--top van-dialog__footer van-dialog__footer--buttons">
                          <button class="van-button van-button--default van-button--large van-dialog__cancel" type="button" onclick="cancelThis(this,'<?php echo $v['content'].'||'.$v['image']?>')">
                            <span class="van-button__text">取消</span></button>
                          <button class="van-button van-button--default van-button--large van-dialog__confirm van-hairline--left" type="button" onclick="saveThis(this)">
                            <span class="van-button__text">保存</span></button>
                        </div>
                      </div>
                      <div class="step-item van-cell-group van-hairline--top-bottom"  >
                        <div class="van-cell" >
                          <div class="van-cell__title" onclick="showThis(this)" >
                            <div class="van-row van-row--flex van-row--align-center">
                              <div class="icon"><?php echo $k+1;?></div>
                              <div class="title">图文说明</div></div>
                          </div>
                          <i class="van-cell__right-icon van-icon van-icon-delete" style="color: red; font-size: 18px;"  onclick="delThis(this)" ></i>
                        </div>
                      </div>
                  
                <?php }?>
                <?php }?>
                  <script type="text/javascript">
                    function showThis(obj)
                    {
                      $(obj).parents('.step-item').prev('.edit-box').show();

                      $(obj).parents('.step-item').parent('.step').find('.van-overlay').show();

                    }
                    function cancelThis(obj,str)
                    {
                        console.log(str);
                        arr=str.split('||');


                        $(obj).parents('.edit-box').children('.van-dialog__content').find('textarea').val(arr[0])
                        $(obj).parents('.edit-box').children('.van-dialog__content').find('img').attr('src',arr[1])


                        $(obj).parents('.edit-box').hide();
                        $('.van-overlay').each(function(i,v){

                        $(v).hide();
                        })
                    }
                    function saveThis(obj)
                    {
                      
                        $(obj).parents('.edit-box').hide();
                        $('.van-overlay').each(function(i,v){

                        $(v).hide();
                        })
                    }
                    function delThis(obj)
                    {
                      $(obj).parents('.step-item').prev('.edit-box').remove();
                      $(obj).parents('.step-item').remove();
                    }
                  </script>
            <?php }?>


            <div class="step-choose-page">
                <div class="step-actionsheet">
                    <div  class="step-actionsheet">
                        <div  class="step-actionsheet_item hairline-top"><span  class="step-actionsheet_name">收集数据</span></div>
                        <div  class="step-actionsheet_item hairline-top"><span  class="step-actionsheet_name">收集截图</span></div>
                        <div  class="step-actionsheet_item hairline-top"><span  class="step-actionsheet_name">网址跳转</span></div>
                        <div  class="step-actionsheet_item hairline-top"><span class="step-actionsheet_name">图文说明</span></div>
                    </div>
                </div>
                <div class="old-task-item">  
                        <div class="task-item">
                            <span class="new-add-task-label">收集数据：</span>
                            <div id="data-item">
                            <textarea class='shuoming new-add-task-content' date_type='1' style='width: 100%; border: none;' id='check_text_content'  placeholder='如需接单者提供文字信息，请在此输入内容，如不需要可不填'></textarea>
                            </div>
                        </div>

                        <div class="task-item"> 收集截图：</div>
                        <div id="upform">
                            <textarea date_type='2' class='shuoming new-add-task-content' style='width: 100%; border: none;height: 72px;' id='check_text_content'  placeholder='适用于需要收集截图结果，详细说明需要的截图要求及截图内容。并且上传截图示例。'></textarea>
                        </div>
                    <div class="task-item" id="url-item" >
                        <span>网址跳转</span>：
                        <div id="url-redrict">       
                            <input type="text" class="task-txt" id="about_url"  placeholder="填写跳转网址，以http(s)://开头" value="{$item['about_url']?$item['about_url']:''}" style="width:100%;" />
                        </div>
                    </div>
                        <div class="task-item" > 图文说明：
                            <span class="task-span" id="task-isRepeat" style="display:inline;">
                            <div id="upload_img">
                                <textarea date_type='4'  placeholder="适用于需要图片说明，引导会员等操作，详细说明相关操作及注意事项。" autofocus="autofocus" rows="3" class="van-field__control" style="height: 72px;"></textarea>
                            </div>
                                </span>
                        </div>
                </div>
            </div>
            <div class="van-overlay"></div>
        </div>
        <!-- 任务组别 -->
         <div class="step">

             <div  class="van-cell-group van-hairline--top-bottom">
                 <div  class="van-cell van-cell--clickable">
                     <i  class="van-icon van-icon-clock van-cell__left-icon"><!----></i>
                     <div  class="van-cell__title">
                         <span >截止时间</span>
                     </div>
                     <div  class="van-cell__value">
                         <input type="text" class="van-field__control van-field__control--right" style="text-indent: 10px;" readonly id="task_endTime" name="end_time" placeholder="请选择结束时间" value="{$item['end_time']?$item['end_time']:''}" />
                     </div>

                     <i  class="van-icon van-icon-arrow van-cell__right-icon"><!----></i>

                 </div>
                 <div class="error-message"></div>
                 <div  class="van-cell van-cell--clickable">
                     <i  class="van-icon van-icon-add-o van-cell__left-icon"><!----></i>
                     <div  class="van-cell__title">
                         <span >任务时间</span>
                     </div>
                     <div  class="van-cell__value">
                         <input type="number" class="task-txt stepper-input task_time_one " style="width: 145px;" readonly  id="task_time" name="task_time" placeholder="请选择任务时间" value="{$item['task_time']?$item['task_time']:''}" />
                     </div>

                     <div  class="van-field__icon" style="margin-left: 4px;">
                         小时内
                     </div>

                 </div>

                 <script>
                     var _data=['1小时','3小时','6小时','12小时','1天','2天','3天','5天','7天'];
                     var mobileSelect1 = new MobileSelect({
                         trigger: '.task_time_one',
                         title: '任务时间选择',
                         wheels: [
                             {data:_data}
                         ],
                         callback:function(indexArr, data){
                             console.log(data)
                               if(data == "1小时"){
                                 data=1;
                             }else if(data == "3小时"){
                                 data = 3;
                             }else if(data == "6小时"){
                                 data = 6;
                             }else if(data == "12小时"){
                                 data = 12;
                             }else if(data == "1天"){
                                 data = 24;
                             }else if(data == "2天"){
                                 data = 48;
                             }else if(data == "3天"){
                                 data = 72;
                             }else if(data == "5天"){
                                 data = 120;
                             }else if(data == "7天"){
                                 data = 168;
                             }
                             $(".task_time_one").val(data)
                         }
                     });
                 </script>
                 <div class="error-message"></div>
                 <div  class="van-cell van-cell--clickable">
                     <i  class="van-icon van-icon-add-o van-cell__left-icon"><!----></i>
                     <div  class="van-cell__title">
                         <span >审核时间</span>
                     </div>
                     <div  class="van-cell__value">
                         <input type="number" class="task-txt stepper-input task_checkout_time_one" style="width: 145px;" readonly  id="task_checkout_time" name="task_checkout_time" placeholder="请选择任务审核时间" value="{$item['task_checkout_time']?$item['task_checkout_time']:'24'}" />
                     </div>

                     <div  class="van-field__icon" style="margin-left: 4px;">
                         小时内
                     </div>

                 </div>
                
                 <div class="error-message"></div>
                 <div  class="van-cell van-cell--clickable">
                     <i  class="van-icon van-icon-after-sale van-cell__left-icon"><!----></i>
                     <div  class="van-cell__title">
                         <span >任务赏金</span>
                     </div>
                     <div  class="van-cell__value">
                         <input type="number" data-fee="{$setting['fee']?$setting['fee']:0}" id="unit_price" name="unit_price" placeholder="请输入任务单价" class="task-txt stepper-input" value="{$categories[0]['min_give_credit2']}" style="width: 145px;" />
                     </div>
                     <div  class="van-field__icon" style="margin-left: 4px;">
                                                                      元
                     </div>

                 </div>
                 <div class="error-message"></div>
                 <div  class="van-cell van-cell--clickable">
                     <i  class="van-icon van-icon-add-o van-cell__left-icon"><!----></i>
                     <div  class="van-cell__title">
                         <span >悬赏数量</span>
                     </div>
                     <div  class="van-cell__value">
                         <input type="number" id="task_num" name="ticket_num" placeholder="请输入任务数量" class="task-txt stepper-input" value="{$categories[0]['min_piaoshu']}" style="width: 145px;"/>
                     </div>
                     <div  class="van-field__icon" style="margin-left: 4px;">
                         个
                     </div>

                 </div>
                 <div class="error-message"></div>
                 <div class="van-cell-group van-hairline--top-bottom" id="total_info">
                     <div  disable="" class="van-cell">
                         <i  class="van-icon van-icon-after-sale van-cell__left-icon"><!----></i>
                         <div  class="van-cell__title"><span >预付赏金</span></div>
                         <div  class="van-cell__value">
                             0.00元 (含{$setting['fee']*100}%服务费)
                         </div>
                         <i  class="van-icon van-icon-warn-o van-cell__right-icon"><!----></i>
                     </div>
                 </div>
                 <div style="margin-top: 0px;margin-bottom: 10px;text-align: center;">
                     发布即表示您已阅读并接受<a href="/home/task/userprotocol" style="color: blue"> <span>《用户使用协议》</span></a>
                 </div>

             </div>

             <div class="old-task-item">
             <div class="task-item">开始时间：
                 <input type="text" style="text-indent: 10px;" readonly id="task_beginTime" name="start_time" placeholder="请选择开始时间" value="{$item['format_start_time']?$item['format_start_time']:''}" />
             </div>
             <div class="task-item">结束时间：
<!--                 <input type="text" style="text-indent: 10px;" readonly id="task_endTime" name="end_time" placeholder="请选择结束时间" value="{$item['end_time']?$item['end_time']:''}" />-->
             </div>
             <div class="task-item">任务单价：
<!--                 <input type="text" data-fee="{$setting['fee']?$setting['fee']:0}" id="unit_price" name="unit_price" placeholder="请输入任务单价" class="task-txt" value="{$item['unit_price']?$item['unit_price']:''}" />-->
             </div>
             <div class="task-item">任务数量：
<!--                 <input type="number" id="task_num" name="ticket_num" placeholder="请输入任务数量" class="task-txt" value="{$item['ticket_num']?$item['ticket_num']:''}" />-->
             </div>
             <div class="task-item">任务金额：
                 <input type="text" id="count_money" name="give_credit2" class="task-txt" readonly="readonly" placeholder="请输入奖励金额" value="{$item['give_credit2']?$item['give_credit2']:''}" />
                 <span class="ts1">余额 <span id="now_gold">{$member.credit2}</span>元</span>
             </div>
             <div class="task-item" style="color:#A6B5B6;">用户
                 <span style="color:red;" id="user_gold">0.00</span>元&nbsp;服务费
                 <span style="color:red;" id="plat_gold">0.00</span>元，退单按原款
             </div>
             <div class="task-item">
                 奖励积分：
                 <input type="number"  placeholder="请输入奖励积分" class="task-txt" name="give_credit1" value="{$item['give_credit1']?$item['give_credit1']:''}" />
                 <span class="ts2">积分 <span id="now_silver">{$member.credit1|intval}</span>分</span>
             </div>
             <div class="task-item">
                 <span id="fee">{$setting['fee']}</span>
             </div>


             <div class="task-item"> 审核周期：
                 <select style="display:inline;" class="task-txt" name="check_period">
                     {if condition="check_array($setting['period'])"}
                     {volist name="setting['period']" id="period"}
                     <option value="{$period}"
                             {if isset($item['check_period']) && $item['check_period']==$period}
                     selected="selected"
                     {/if}
                     >
                     {if condition="$period eq '0'"}
                     立即显示
                     {else}
                     {$period}小时后显示
                     {/if}
                     </option>
                     {/volist}
                     {/if}
                 </select>
             </div>

             <div class="task-item">
                 <span class="new-add-task-label">备注：</span>
                 <textarea class="shuoming new-add-task-content" id="remarks" name="remarks" placeholder="200字以内">{$item['remarks']?$item['remarks']:''}</textarea>
             </div>
             <div class="task-item new-task-item">
                 是否需要截图：
                 <input type="hidden" name="is_screenshot" value="{$item['is_screenshot']?$item['is_screenshot']:'0'}">
                 <p class="checkbox checkbox-img {$item['is_screenshot']?'active':''}">
                     <span class="circle"></span>
                 </p>
             </div>
             <div class="task-item new-task-item" style="display:none;">
                 是否限制IP：
                 <input type="hidden" name="is_ip_restriction" value="{$item['is_ip_restriction']?$item['is_ip_restriction']:'0'}">
                 <p class="checkbox checkbox-ip {$item['is_ip_restriction']?'active':''}">
                     <span class="circle"></span>
                 </p>
             </div>
             <div class="task-item" id="limit-area" style="display:none;">
                 请选择区域：
                 <select class="task-txt" style="width:60%;" name="province">
                     <option value="0">请选择限制区域</option>
                     {if condition="check_array($provinces)"}
                     {volist name="provinces" id="province"}
                     <option value="{$province}">{$province}</option>
                     {/volist}
                     {/if}
                 </select>
             </div>

             <div class="task-item" id="betweenHourdiv" style="display:none;">
                 <input type="number" name="interval_hour" placeholder="请输入参与间隔小时数" class="task-txt" value="{$item['interval_hour']?$item['interval_hour']:''}" />小时
             </div>
             <div class="task-item new-task-item">
                 是否限速：
                 <input type="hidden" name="is_limit_speed" value="{$item['is_limit_speed']?$item['is_limit_speed']:'0'}">
                 <p class="checkbox checkbox-limitMin {$item['is_limit_speed']?'active':''}">
                     <span class="circle"></span>
                 </p>
             </div>
             <div class="task-item" id="limitmindiv" style="display:none;">
                 每&nbsp;<span style="color: red">{$setting['speed']?$setting['speed']:5}</span>&nbsp;分钟限<input type="number" name="limit_ticket_num" placeholder="票数" class="task-txt" value="{$item['limit_ticket_num']?$item['limit_ticket_num']:''}" style="width:80px;text-indent: 10px;" />票
             </div>
             <div class="task-item" style="display:none;">
                 任务完成后是否隐藏：
                 <span class="task-span" id="task-isHide" style="display:inline;">
                        <a href="javascript:void" class="t_wx">是</a><a href="javascript:void" class="t_wx t_wx_selected">否</a></span>
             </div>
             </div>
             <div class="van-dialog dialog-money " style="z-index: 2011;">
                 <div class="title-dialog">预付款说明</div>
                 <div class="content-dialog">
                     悬赏主按完成任务个数为工作者支付工资，平台另收取{$setting['fee']*100}%的服务费，任务结束后未使用完的预付款将归还到悬赏主的余额
                 </div>
                 <div class="btn-ok">
                     <button type="button"  style="color: blue;width: 150px;height: 40px" id="yes-dialog">
                         <span class="button-text-new">确定</span>
                     </button>
                 </div>
             </div>
             <div class="van-overlay"></div>
         </div>
        <!-- 提交申请 -->
        <div class="step">



        </div>
    </div>
    <!--   收集截图   -->
    <div class="write_step_wrap task-item-pic" style="z-index: 2013;">
        <div class="step_cont_wrap" style="top:30px">
            <div class="opera_content">
            <div class="image-box-img">
                {if !empty($item['thumbs'])}
                {volist name="item['thumbs']" key="k" id="thumb"}
                <div class="item img-item">
                    <img class="images-item" src="{:to_media($thumb)}" />
                    <input type="hidden" name="thumbsi[]" value="{$k-1}" id="thumbsi-img"/>
                </div>
                {/volist}
                {/if}
                <div class="item">
                    <span id="uploadForm"></span>
                </div>
            </div>
            <div class="files"  style="display: none">
                <input type="file" accept="image/*" name="thumbs[]">
            </div>
                <div class="message"></div>
        </div>
            <div class="guize_btn_wrap"  onclick="finishStepImg();">确定</div>
        </div>
    </div>

    <!-- 操作流程   -->
    <div class="write_step_wrap" style="z-index: 2013;">
        <div class="step_cont_wrap" style="top:30px">
            <div class="opera_content">
                <!-- <div class="close_wrapper"  onclick="returnCreateStep();"></div> -->
                <div class="guize_title">请填写操作说明</div>
                <!-- 内容 -->
                <div class="write_step_content">
                    <div class="step_content step_cont">
                        <ul class="clearfix" id="stepUl"></ul>
                        <div class="write_step_pager">
                            <select id="write_step_pager_select" onchange="changePage(this);">
                                <option value="0">步骤</option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
            <div class="guize_btn_wrap"  onclick="finishStep();">确定</div>
            <a class="step_bottom_a  bottom_a  prev_a " onclick="changePrev(1);"></a>
            <a class="step_bottom_a  bottom_a  next_a " onclick="changeNext(1);"></a>
        </div>
    </div>
    <input type="hidden" name="id" id="id" value="{$item['id']?$item['id']:'0'}">
    <div class="action-bar action-step">
        <button class="warning button-warning" style="background: #fde03f;"><span  class="button-text" style="color:#834100;">上一步</span></button>
        <button  class="show-btn button-show"><span class="button-text">查看预览</span></button>
        <button class="danger button-danger"  style="background: #fde03f;"><span  class="button-text"  style="color:#834100;">下一步</span></button>
    </div>
</form>
<input type="hidden" name="ifpass" id="ifpass">
<input type="hidden" name="check_state" id="check_state">
<input type="hidden" name="min_price" id="min_price">
<input type="hidden" name="min_number" id="min_number" value="1">
<input type="hidden" name="service_charge" id="service_charge" value="{$setting['fee']?$setting['fee']:0}">


</div>

<script type="text/javascript" src="/static/home/mobile/js/task_add.js?v=<?=rand(1,100);?>"></script>
<script type="text/javascript">
    var scroWidth= 300;//流程图的宽度
    var scroWidthCheck = 70;//验证图的宽度
    var post_form_action = window.location.href;

    {if isset($item['id']) && $item['id'] > 0}
    countMoney({$item['unit_price']}, {$item['ticket_num']});

    post_form_action = '/home/task/save';
    {/if}

        //审核图样
        /*var checkImgLength = $("#clearfix li").length;
        if(checkImgLength == 0 ){
            var html = '';
            html += '<li class="checkFile" id="checkFile0">';
            html += '<div class="file_wrap checkFileWrap" id="checkFileWrap0">';
            html += '<img src="/static/home/mobile/images/img.png" id="checkImg0">';
            html += '<input type="file" name="checkFile" class="checkInput" id="checkImgData0" onchange="setImagePreviews(0);" accept="image/*">';
            html += '<div class="upload_msg checkMsg" id="checkMsg0">上传图片</div></div></li>';
            html += '<div class="clear"></div>';
            $("#clearfix").append(html);
        }else{
            var html = '';
            html += '<li class="checkFile" id="checkFile' + checkImgLength + '">';
            html += '<div class="file_wrap checkFileWrap" id="checkFileWrap' + checkImgLength + '">';
            html += '<img src="/static/home/mobile/images/img.png" id="checkImg' + checkImgLength + '">';
            html += '<input type="file" name="checkFile" class="checkInput" id="checkImgData' + checkImgLength + '" onchange="setImagePreviews(' + checkImgLength + ');" accept="image/*">';
            html += '<div class="upload_msg checkMsg" id="checkMsg' + checkImgLength + '">上传图片</div></div></li>';
            html += '<div class="clear"></div>';
            $("#clearfix").append(html);
        }
        if(checkImgLength > 1){
            $("#imgNum").html(checkImgLength-1);//已上传审核图片的张数
        }*/

        var html = '';
        var operate_step_i, operate_step_result;

        {if !is_null($operate_steps)}
        {volist name="operate_steps" key="k" id="operate_step"}
        operate_step_i = {$k};
        //阿拉伯数字转换为简写汉字转换
        try {
            operate_step_result = Arabia_To_SimplifiedChinese(operate_step_i);
        } catch (e) {
            console.error(e);
        }

        html += '<li class="each_step' + (operate_step_i-1) + '">';
        html += '<div class="each_step"><div class="step_intro">';
        html += '<div class="stepWrap" id="stepWrap' + (operate_step_i-1) + '">';
        html += '<div class="step_title"  id="step_title' + (operate_step_i-1) + '">步骤' + operate_step_result +'<span class="del' + (operate_step_i-1) + '"   onclick="delStep(' + (operate_step_i-1) + ');">删除</span></div>';
        html += '</div>';
        html += '<input type="hidden" class="operate_step_id" name="operate_step_id[]" value="{$operate_step.id}" />';
        html += '<textarea id="stepText' + (operate_step_i-1) + '" name="process_sm[org{$operate_step.id}]" onblur="checkContent(this);" maxlength="1000" id="stepText' + (operate_step_i-1) + '" class="step_text" placeholder="请输入操作说明文字">{$operate_step.content}</textarea></div>';
        html += '<div class="step_photo_wrap  stepPhotoWrap"  id="stepPhotoWrap' + (operate_step_i-1) + '"><div class="file_wrap stepFileWrap" id="stepFileWrap' + (operate_step_i-1) + '">';
        html += '<img src="{:to_media($operate_step.image)}" class="uploadImg" id="resultImg' + (operate_step_i-1) + '"/>';
        html += '<input type="file" name="processFile[org{$operate_step.id}]" class="stepInput"  id="uploadImgData' + (operate_step_i-1) + '"  onchange="stepSetImagePreviews(' + (operate_step_i-1) + ');" accept="image/*" />';
        html += '<div class="upload_msg stepMsg" id="stepMsg' + (operate_step_i-1) + '">上传图片</div>';
        html += '</div></div></div></li>';
        {/volist}
            $("#stepUl").append(html+'<div class="clear"></div>');
            $("#stepUl").css({width:scroWidth * operate_step_i + "px"});
            {/if}

                //写流程
                /* $(".step_cont_wrap").css({minHeight : scroHeight + "px"}); */
                var stepImgLength = $("#stepUl li").length;

                if(stepImgLength == 0 ){
                    //初次进入，未添加过任何步骤
                    html += '<li class="each_step0">';
                    html += '<div class="each_step"><div class="step_intro">';
                    html += '<div class="stepWrap" id="stepWrap0">';
                    html += '<div class="step_title"  id="step_title0">步骤一<span class="del0"   onclick="delStep(0);">删除</span></div>';
                    html += '</div>';
                    html += '<textarea id="process_sm" name="process_sm[]" onblur="checkContent(this);" maxlength="1000" id="stepText0" class="step_text" placeholder="请输入操作说明文字"></textarea></div>';
                    html += '<div class="step_photo_wrap  stepPhotoWrap"  id="stepPhotoWrap0"><div class="file_wrap stepFileWrap" id="stepFileWrap0">';
                    html += '<img src="/static/home/mobile/images/img.png" id="resultImg0"/>';
                    html += '<input type="file" name="processFile[]" class="stepInput"  id="uploadImgData0"  onchange="stepSetImagePreviews(0);" accept="image/*" />';
                    html += '<div class="upload_msg stepMsg" id="stepMsg0">上传图片</div>';
                    html += '</div></div></div></li><div class="clear"></div>';

                    $("#stepUl").append(html);
                    $("#stepUl").css({width:scroWidth + "px"});
                }else{
                    $(".step_bottom_a").css({display:"block"});
                }
                $("#stepUl li").css({width:scroWidth + "px"});

			console.log(document.body.clientHeight);
			//$('#task_num').val()
</script>
<!--{include file='common/ufooter'/}-->
</body>

</html>